﻿using PmSoft;
using System.ComponentModel.DataAnnotations;
using System.Xml.Linq;
using static Modules.Project.ProjectConstants;

namespace ManagementApi.Models.System.Dept
{
    /// <summary>
    /// 主管单位表单
    /// </summary>
    public class DeptEditForm
    {
        /// <summary>
        /// 主管单位id
        /// </summary>
        [Display(Name = "主管单位id")]
        public int? DeptId { get; set; }
        /// <summary>
        /// 行业分类
        /// </summary>
        [Display(Name = "行业分类")]
        [Required(ErrorMessage = "{0}不能为空")]
        public 行业主管部门 IndustryType { get; set; }
        /// <summary>
        /// 主管单位名称
        /// </summary>
        [Display(Name = "主管单位名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 组织机构代码
        /// </summary>
        [Display(Name = "组织机构代码")]
        public string? Code { get; set; }

        /// <summary>
        /// 归属省代码
        /// </summary>
        [Display(Name = "归属省代码")]
        public int? ProvinceCode { get; set; }

        /// <summary>
        /// 归属地市代码
        /// </summary>
        [Display(Name = "归属地市代码")]
        public int? CityCode { get; set; }

        /// <summary>
        /// 归属区县代码
        /// </summary>
        [Display(Name = "归属区县代码")]
        public int? AreaCode { get; set; }

        /// <summary>
        /// 行政级别 1：部、2：省、3：市、4：县
        /// </summary>
        [Display(Name = "行政级别 1：部、2：省、3：市、4：县")]
        [Required(ErrorMessage = "{0}不能为空")]
        public int? Level { get; set; }

        /// <summary>
        /// 区域Id
        /// </summary>
        [Display(Name = "区域Id")]
        public int? AreaId { get; set; }

    }
}
